load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test")

package(default_visibility = ["//rs:ic-os-pkg"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/ic_os/config:config_lib",
    "//rs/ic_os/config_types",
    "//rs/ic_os/network",
    "//rs/ic_os/utils",
    "@crate_index//:anyhow",
    "@crate_index//:clap",
    "@crate_index//:regex",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:indoc",
]

ALIASES = {}

rust_binary(
    name = "guestos_tool",
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "guestos_tool",
    proc_macro_deps = MACRO_DEPENDENCIES,
    target_compatible_with = [
        "@platforms//os:linux",
    ],
    deps = DEPENDENCIES,
)

rust_test(
    name = "test",
    size = "small",
    crate = ":guestos_tool",
    deps = DEPENDENCIES,
)
